home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Broadcaster / Broadcaster.cp next >
Encoding:
Text File  |  1997-06-28  |  385 b   |  20 lines  |  [TEXT/CWIE]

  1. // Broadcaster.cp
  2.  
  3. #ifndef Broadcaster_h
  4. #include "Broadcaster.h"
  5. #endif
  6. #ifndef BroadcastLoop_h
  7. #include "BroadcastLoop.h"
  8. #endif
  9.  
  10. template < class Protocol >
  11. void Broadcaster<Protocol>::Send( void (ProtocolType::*message)() )
  12.   {
  13.     for ( BroadcastLoop<Protocol> receiver( *this );
  14.             receiver.Unfinished();
  15.             receiver++ )
  16.         ((*receiver).*message)();
  17.   }
  18.  
  19. #include "BroadcastLoop.cp"
  20.